package com.cc.feign;

import com.cc.entity.ChildrenCategory;
import com.cc.entity.ParentCategory;
import com.cc.fallback.CategoryFeignFallBack;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@FeignClient(value = "category-server", fallback = CategoryFeignFallBack.class)
public interface CategoryFeign {

    @RequestMapping("/selectParentCategory")
    List<ParentCategory> selectParentCategory(@RequestBody ParentCategory parentCategory);

    @RequestMapping("/selectChildrenCategory")
    List<ChildrenCategory> selectChildrenCategory(@RequestBody ChildrenCategory childrenCategory);

    @RequestMapping("insertChildrenCategory")
    Integer insertChildrenCategory(@RequestBody ChildrenCategory childrenCategory);
}
